function setHtmlSize() {
    var clientWidth = document.documentElement.clientWidth;
    // console.log(clientWidth)
    var dpr;
    if( clientWidth > 750 ) {
        clientWidth = 375;
        document.getElementsByTagName("body")[0].style.backgroundColor = "rgba(0,0,0,.5)";
        document.getElementsByTagName("body")[0].style.position = "relative";
        document.getElementsByTagName("body")[0].style.width = clientWidth + 'px';
        document.getElementsByTagName("body")[0].style.margin = 'auto';
        dpr = 2;
    }else{
        dpr = window.devicePixelRatio || 1;
    }
    // var dpr = window.devicePixelRatio || 1;
    var htmlFontSize = clientWidth * dpr / 10 * (1 / dpr);
    // console.log(dpr);
    document.getElementsByTagName("html")[0].style.fontSize = htmlFontSize + "px";
}
window.onresize = function () {
    document.getElementsByTagName("body")[0].removeAttribute("style");
    setHtmlSize();
}
setHtmlSize();